package com.wteam.dragon.shop.pojo.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.*;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import com.wteam.dragon.system.basebean.bean.BaseBean;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @Author 陈晓辉
 * @Date 2020/7/7 19:51
 */
@Data
@Table
@TableName
@EqualsAndHashCode(callSuper = true)
public class ProductProductAttribute extends BaseBean {
    @IsKey
    @IsNotNull
    @IsAutoIncrement
    @TableId(type = IdType.AUTO)
    @ColumnType(MySqlTypeConstant.BIGINT)
    @Column(comment = "自增id")
    private Long id;

    @IsNotNull
    @Column(comment = "对应的商品id")
    @ColumnType(MySqlTypeConstant.BIGINT)
    private Long productId;

    @IsNotNull
    @Column(comment = "对应的商品属性id")
    @ColumnType(MySqlTypeConstant.BIGINT)
    private Long productAttributeId;

    @IsNotNull
    @Column(comment = "手动添加规格或参数的值，参数单值，规格有多个时以逗号隔开")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    private String value;

}
